using System.Windows;
using System.Windows.Controls;
using Tryit.ViewModels;
using System.Collections.ObjectModel;

namespace Tryit.Views
{
    public partial class PersonManagementView : Window
    {
        private readonly PersonManagementViewModel _viewModel;

        public PersonManagementView(ObservableCollection<string> analystList, ObservableCollection<string> verifierList)
        {
            InitializeComponent();
            _viewModel = new PersonManagementViewModel(analystList, verifierList);
            DataContext = _viewModel;
            Loaded += PersonManagementView_Loaded;
        }

        private void PersonManagementView_Loaded(object sender, RoutedEventArgs e)
        {
            _viewModel.DataGrid = PersonDataGrid;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            Close();
        }
    }
} 